package com.example.b_308.software.comment.view.title;


import android.app.Application;
import android.content.Context;
import android.content.Intent;

/**
 * Created by B-308 on 2017/11/27.
 */

public class OfficeApplication extends Application {
    static OfficeApplication application;
    Intent intent;

    public static Context getInstance() {
        return application;
    }



    @Override
    public void onCreate() {
        super.onCreate();
        application = this;
        intent = new Intent(this, WorkAndroidService.class);
        startService(intent);
    }

    @Override
    public void onTerminate() {
        stopService(intent);
        // 程序终止的时候执行
        super.onTerminate();
    }
}
